import java.util.Scanner;

public class sevendotthree {
    public static void main(String args[]){
        Scanner reader = new Scanner(System.in);
        String number;
        int n;
        while(true){
            number = reader.next();
            if(number.compareTo("10000") >= 0 && number.compareTo("20000") < 0){
                n = Integer.parseInt(number);
                System.out.println(Integer.toBinaryString(n) + "," + Integer.toOctalString(n) + "," + Integer.toHexString(n));
            }else{

            }
        }
    }
}
